# _*_ coding : utf-8 _*_
# @Time : 2022/9/11 14:45
# @Author : 软柠柠吖
# @File : 014_while3_xls_99
# @Project : pythonProject

# x = 1
# while x <= 9:
#     y = 1
#     while y <= x:
#         txt = '{}x{}={}'.format(y, x, x * y)
#         y += 1
#         print(txt, end='\t')
#     x += 1
#     print()

# 导入 xlwt 库
import xlwt

year_num = 2015
while year_num <= 2019:
    year_txt = '{}年.xls'.format(year_num)
    # 新建工作簿
    nwb = xlwt.Workbook('utf-8')
    year_num += 1
    month_num = 1
    while month_num <= 12:
        month_txt = '{}月份'.format(month_num)
        month_num += 1
        nwb.add_sheet(month_txt)
    nwb.save(r'D:\桌面\test\\' + year_txt)
